package com.ruoyi.compensationManagement.mapper;

import java.util.List;
import com.ruoyi.compensationManagement.domain.CompensationSalarySetting;
import org.apache.ibatis.annotations.Param;

/**
 * 薪级薪资设置Mapper接口
 * 
 * @author ruoyi
 * @date 2022-10-05
 */
public interface CompensationSalarySettingMapper 
{
    /**
     * 查询薪级薪资设置
     * 
     * @param payId 薪级薪资设置主键
     * @return 薪级薪资设置
     */
    public CompensationSalarySetting selectCompensationSalarySettingByPayId(Long payId);

    /**
     * 查询薪级薪资设置列表
     * 
     * @param compensationSalarySetting 薪级薪资设置
     * @return 薪级薪资设置集合
     */
    public List<CompensationSalarySetting> selectCompensationSalarySettingList(CompensationSalarySetting compensationSalarySetting);

    /**
     * 新增薪级薪资设置
     * 
     * @param compensationSalarySetting 薪级薪资设置
     * @return 结果
     */
    public int insertCompensationSalarySetting(CompensationSalarySetting compensationSalarySetting);

    /**
     * 修改薪级薪资设置
     * 
     * @param compensationSalarySetting 薪级薪资设置
     * @return 结果
     */
    public int updateCompensationSalarySetting(CompensationSalarySetting compensationSalarySetting);

    /**
     * 删除薪级薪资设置
     * 
     * @param payId 薪级薪资设置主键
     * @return 结果
     */
    public int deleteCompensationSalarySettingByPayId(Long payId);

    /**
     * 批量删除薪级薪资设置
     * 
     * @param payIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteCompensationSalarySettingByPayIds(Long[] payIds);

    /**
     * 判断payId节点的所有子节点
     * @param payId
     * @return
     */
    List<CompensationSalarySetting> selectChildNodeByPayId(Long payId);

    /**
     * 根据用户id查询薪级薪资
     * @param userId
     * @return
     */
    CompensationSalarySetting selectCompensationSalarySettingByUserId(Long userId);

    /**
     * 根据当前orderNum和父payId查找升级后的payId
     * @param parentId 父payId
     * @param orderNum orderNum
     * @return 升级后的payId
     */
    Long getUpPayScale( @Param("parentId") Long parentId, @Param("orderNum") Integer orderNum);
}
